using System;
using System.Net;

namespace ScottLane.VideoInbox
{
    /// <summary>
    /// Downloads files from the web and supports resuming of partial downloads.
    /// </summary>
    public class FileDownloader : System.Net.WebClient
    {
        public FileDownloader(Uri uri)
        {
            _uri = uri;
        }

        private Uri _uri;

        public Uri Uri
        {
            get { return _uri; }
        }

        public void Download(string fileName)
        {
            new WebClient().DownloadFile(_uri, fileName);
        }
    }
}
